import {post} from '../ck/plugin/axios'

class Semester{
  //查询列表
  //data是limit和page
  static async PageSearch(data){
    return post('api/Manage/Semester/PageSearch',data)
  }

  //查询学期的集合
  static async PageSearchList(){
    return post('api/Manage/Semester/PageSearchList')
  }

  //获取当前正在启用的学期的ID
  static async GetCurrentSemester(){
    return post('api/Manage/Semester/GetCurrentSemester')
  }

  //新增
  //data是title
  static async Add(data){
    return post('api/Manage/Semester/Add',data)
  }

  //删除
  //data是ID
  static async Delete(data){
    return post('api/Manage/Semester/Delete',data)
  }

  //查询详情
  //data是点击的某一条的ID
  static async SearchModelDetails(data){
    return post('api/Manage/Semester/SearchModelDetails',data)
  }

  //编辑
  //data是ID和Title
  static async Update(data){
    return post('api/Manage/Semester/Update',data)
  }

  //启停
  //data是ID
  static async UpdateStatus(data){
    return post('api/Manage/Semester/OpenSemester',data)
  }

}

export default Semester
